import request from '@/utils/request'

export function fetchFunctionList(data) {
  return request({
    url: '/cloud-system/getFunctionList',
    method: 'post',
    data: data
  })
}

export function fetchFunctionOne(data) {
  return request({
    url: '/cloud-system/getOneFunctionDetail',
    method: 'post',
    data
  })
}

export function createFunction(data) {
  return request({
    url: '/cloud-system/createOneFunction',
    method: 'post',
    data
  })
}

export function updateFunction(data) {
  return request({
    url: '/cloud-system/updateOneFunction',
    method: 'post',
    data
  })
}

export function deleteFunction(data) {
  return request({
    url: '/cloud-system/deleteOneFunction',
    method: 'post',
    data
  })
}

export function lockFunction(data) {
  return request({
    url: '/cloud-system/lockOneFunction',
    method: 'post',
    data
  })
}

export function unlockFunction(data) {
  return request({
    url: '/cloud-system/unlockOneFunction',
    method: 'post',
    data
  })
}

export function clickFunction(data) {
  return request({
    url: '/cloud-system/cilckFunction',
    method: 'post',
    data
  })
}

export function batchDeleteFunction(data) {
  return request({
    url: '/cloud-system/batchDeleteFunction',
    method: 'post',
    data
  })
}

export function batchLockFunction(data) {
  return request({
    url: '/cloud-system/batchLockFunction',
    method: 'post',
    data
  })
}

export function batchUnLockFunction(data) {
  return request({
    url: '/cloud-system/batchUnLockFunction',
    method: 'post',
    data
  })
}
